package kuzha.ast;

public class LockStatement extends BlockStatement {
	public final Expression object;
	public final Statement body;
	
	public LockStatement(Expression object, Statement body) {
		if (object == null || body == null)
			throw new IllegalArgumentException();
		this.object = object;
		this.body = body;
	}
	
	@Override
	public void accept(AstVisitor visitor) {
		visitor.visit(this);
	}
	@Override
	public <A, R> R accept(AstVisitor2<A, R> visitor, A object) {
		return visitor.visit(this, object);
	}
}
